<template>
  <Drawer class="drawer" :title="title" :mask-closable="false" :closable="false" v-model="drawer"  :width="width">
      <div style="position: absolute;top: 70px;left: -17px;cursor: pointer" @click="closeImgModalBtn">
        <img src="@/assets/globalIcon/closeIcon.png" alt="Close">
      </div>
      <slot></slot>
    </Drawer>
</template>

<script>

export default {
  name:'drawers',
  watch:{
    drawer(newVal,oldVal){
      if(oldVal&&!newVal){
        this.$emit('on-close')
      }
    }
  },
  props:{
    title:{
      type:String,
      default:'打开抽屉'
    },
    width:{
      type:Number,
      default:800
    }
  },
  data(){
    return{
      drawer:false,
      needRecordStatus:'',
    }
  },
  methods:{
    openDrawer(needRecordStatus,notRequest){
      this.drawer = true;
    },
    closeImgModalBtn(){
      this.drawer = false;
    }
  }

}
</script>

